<template>
	<view class="content">
		<u-navbar leftIconColor="#fff" titleStyle="color:#fff" title="上传凭证" bgColor="transparent" :autoBack="true"
			:placeholder="false">
		</u-navbar>
		<view style="height: 6vh;"></view>
		<view class="up_top">
			<view class="top_left">
				<view class="left-title">
					上传凭证
				</view>
				<view class="time">
					请在 00:20:10 前上传
				</view>
			</view>
			<view class="up_btn" v-if="this.status < 4" @click="status = 4">
				上传
			</view>
			<view class="up_btn" v-if="this.status == 4" @click="status = 5">
				确认上传
			</view>
			<view class="up_btn" v-if="this.status == 5">
				确认收款
			</view>
		</view>
		<view class="my-content">
			<view class="info-box">
				<view class="info-head">
					<image src="/static/my/my_head.png" mode=""></image>
					<view>
						188****8888
					</view>
				</view>
				<view class="info-num">
					<view class="num-item">
						<view class="num">
							￥<text>60.24</text>
						</view>
						<view class="num-text">
							单价
						</view>
					</view>
					<view class="num-item">
						<view class="num">
							<text>12</text>KTB
						</view>
						<view class="num-text">
							数量
						</view>
					</view>
					<view class="num-item">
						<view class="num">
							￥<text>60.24</text>
						</view>
						<view class="num-text">
							总价
						</view>
					</view>
				</view>
				<view class="order">
					<view>
						下单时间
					</view>
					<view class="order-time">
						09-05 16:37:22
					</view>
				</view>
				<view class="up-tips" v-if="this.status == 5">
					等待确认
				</view>
				<view class="up-tips" v-else>
					等待上传
				</view>
			</view>
			<view class="head" v-if="this.status < 4">
				<view :class="item.show == true?'activity':'stillness'" class="head-item"
					v-for="(item,index) in headList" :key="index" @click="headTab(index)">
					<image :src="item.img" mode="heightFix"></image>
					<view>
						{{item.text}}
					</view>
				</view>
			</view>
			<view class="payment" v-if="this.status == 0">
				<view class="payment-item">
					<view class="payment-title">
						银行名称
					</view>
					<view class="payment-right">
						<view>
							133258586545
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						银行卡号
					</view>
					<view class="payment-right">
						<view>
							6224224521435411
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						收款人
					</view>
					<view class="payment-right">
						<view>
							你好，星期天
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
			</view>
			<view class="payment" v-if="this.status == 1">
				<view class="payment-item">
					<view class="payment-title">
						微信名称
					</view>
					<view class="payment-right">
						<view>
							133258586545
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						微信号
					</view>
					<view class="payment-right">
						<view>
							6224224521435411
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="code">
						
					</view>
				</view>
			</view>
			<view class="payment" v-if="this.status == 2">
				<view class="payment-item">
					<view class="payment-title">
						支付宝昵称
					</view>
					<view class="payment-right">
						<view>
							星期天
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						支付宝账号
					</view>
					<view class="payment-right">
						<view>
							133258586545
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="code">
						
					</view>
				</view>
			</view>
			<view class="payment" v-if="this.status == 3">
				<view class="payment-item">
					<view class="payment-title">
						链名称
					</view>
					<view class="payment-right">
						<view>
							星期天
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						链接地址
					</view>
					<view class="payment-right">
						<view>
							dshjdhajhjfhajfkjk55656
						</view>
						<image src="/static/home/copy.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="code">
						
					</view>
				</view>
			</view>
			<view class="up-box" v-if="this.status == 4">
				<view class="up-bg">
					
				</view>
			</view>
			<view class="up-box" v-if="this.status == 5">
				<view class="up-bg">
					
				</view>
			</view>
			<view class="payment">
				<view class="payment-item">
					<view class="payment-title">
						收款联系人
					</view>
					<view class="payment-right">
						<view>
							15109173079（时彩铃）
						</view>
						<image src="/static/community/tell.png" mode=""></image>
					</view>
				</view>
				<view class="payment-item">
					<view class="payment-title">
						收款人
					</view>
					<view class="payment-right">
						<view>
							15109173079（王 超）
						</view>
						<image src="/static/community/tell.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				status: 0,
				headList: [{
						text: '银行卡',
						show: true,
						img: '/static/community/bank.png'
					},
					{
						text: '微信',
						show: false,
						img: '/static/community/chat.png'
					},
					{
						text: '支付宝',
						show: false,
						img: '/static/community/alipay.png'
					},
					{
						text: 'USDT',
						show: false,
						img: '/static/community/usdt.png'
					}
				],
				msg:{}
			}
		},
		onLoad(option){
			this.getList(option.id)
		},
		methods: {
			getList(id){
				uni.showLoading();
				this.$Request({
					method: 'POST',
					url: '/api/exchange/uploadVoucherykb',
					data:{
						id
					}
				}).then(res => {
					uni.hideLoading()
					if (res.code == 1) {
						this.msg=res.data
					}else {
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
					}
				})
			},
			gonavto(url) {
				if (url == '') {
					uni.showToast({
						title: '开发中0.0',
						icon: 'none'
					})
				} else {
					uni.navigateTo({
						url: url
					})
				}
			},
			goincome() {
				uni.navigateTo({
					url: '/pages/my/income/index'
				})
			},
			headTab(index) {
				this.headList.map((item) => {
					item.show = false
				})
				this.headList[index].show = true
				this.status = index
			},
		}
	}
</script>

<style>
	page {
		background-color: #250F5A;
	}
</style>
<style lang="scss" scoped>
	.content {
		width: 100%;
		background: linear-gradient(90deg, #513AFD 0%, #F42FF9 54%, #F85B9F 100%);
		height: 568rpx;

		.up_top {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 30rpx;

			.top_left {
				.left-title {
					font-size: 40rpx;
					font-weight: 600;
					color: #fff;
				}

				.time {
					font-size: 24rpx;
					color: #eee;
					margin-top: 20rpx;
				}
			}

			.up_btn {
				padding: 20rpx;
				background-color: #fff;
				width: 200rpx;
				text-align: center;
				border-radius: 40rpx;
				font-size: 28rpx;
				font-weight: 600;
				color: #F53AE2;
			}
		}

		.my-content {
			background-color: #250F5A;
			border-top-right-radius: 40rpx;
			border-top-left-radius: 40rpx;
			padding: 30rpx;
			color: #fff;

			.info-box {
				padding: 30rpx;
				background-color: rgba(255, 255, 255, .05);
				border-radius: 30rpx;
				position: relative;
				.up-tips {
					position: absolute;
					top: 0;
					right: 0;
					padding: 10rpx 30rpx;
					border-top-right-radius: 20rpx;
					border-bottom-left-radius: 20rpx;
					background-color: rgba(255, 219, 134, 0.13);
					color: #FFDB86;
					font-size: 28rpx;
				}

				.info-head {
					display: flex;
					align-items: center;
					font-weight: 600;
					font-size: 32rpx;

					image {
						width: 104rpx;
						height: 104rpx;
						margin-right: 20rpx;
						border-radius: 50%;
					}
				}

				.info-num {
					padding: 30rpx;
					background-color: rgba(255, 255, 255, .08);
					border-radius: 30rpx;
					display: flex;
					justify-content: space-between;
					text-align: center;
					margin-top: 30rpx;

					.num-item {
						.num {
							font-size: 24rpx;

							text {
								font-weight: 600;
								font-size: 36rpx;
							}
						}

						.num-text {
							color: #eee;
							font-size: 24rpx;
							margin-top: 10rpx;
						}
					}
				}

				.order {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 30rpx;
					font-size: 24rpx;
					color: #999;

					.order-time {
						color: #fff;
					}
				}
			}

			.head {
				display: flex;
				justify-content: space-between;

				padding: 30rpx 0;

				.head-item {
					width: 160rpx;
					font-size: 24rpx;
					padding: 30rpx 0;
					border-radius: 20rpx;
					color: #fff;
					display: flex;
					align-items: center;
					justify-content: center;

					image {
						width: 26.77rpx;
						height: 25.5rpx;
						margin-right: 10rpx;
					}
				}

				.activity {
					background-color: #563AFD;
				}

				.stillness {
					background-color: rgba(255, 255, 255, .05);
				}
			}

			.payment {
				background-color: rgba(255, 255, 255, .05);
				padding: 30rpx;
				border-radius: 30rpx;
				margin-bottom: 30rpx;

				.payment-item {
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding-bottom: 30rpx;
					border-bottom: 1rpx solid rgba(255, 255, 255, .2);
					margin-top: 30rpx;

					.payment-title {
						color: #ddd;
					}

					.payment-right {
						display: flex;
						align-items: center;
						color: #fff;
						font-size: 28rpx;

						image {
							width: 27rpx;
							height: 27rpx;
							margin-left: 20rpx;
						}
					}
					.code {
						width: 240rpx;
						height: 240rpx;
						background-color: #250F5A;
						margin: 0 auto;
						padding: 10rpx;
					}
				}

				.payment-item:first-child {
					margin: 0;
				}

				.payment-item:last-child {
					border: none;
					padding: 0;
				}
			}
			.up-box {
				padding: 30rpx;
				background-color: rgba(255, 255, 255, .05);
				border-radius: 30rpx;
				margin: 30rpx 0;
				display: flex;
				justify-content: center;
				.up-bg {
					background-color: #250F5A;
					width: 390rpx;
					height: 644rpx;
				}
			}
		}
	}
</style>